package com.inspur.edp.config;

import com.inspur.edp.paasuser.rest.SynchronizationInfoController;
import com.inspur.edp.team.rest.EnvAuthorityController;
import com.inspur.edp.team.rest.TeamController;
import com.inspur.edp.team.rest.TeamMemberController;
import io.iec.edp.caf.rest.RESTEndpoint;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class PaasRestConfig {

    @Bean
    public RESTEndpoint teamEndpoint() {
        return new RESTEndpoint(
                "/dev/main/v1.0/paas/team",
                new TeamController()
        );
    }

    @Bean
    public RESTEndpoint TeamMemberEndpoint() {
        return new RESTEndpoint(
                "/dev/main/v1.0/paas/teammember",
                new TeamMemberController()
        );
    }

    @Bean
    public RESTEndpoint EnvAuthorityEndpoint() {
        return new RESTEndpoint(
                "/dev/main/v1.0/paas/envauthority",
                new EnvAuthorityController()
        );
    }

    @Bean
    public RESTEndpoint SynchronizationInfoEndpoint() {
        return new RESTEndpoint(
                "/dev/main/v1.0/paasusersynchronization",
                new SynchronizationInfoController()
        );
    }
}
